package com.shujia.mapdesk;

import java.io.File;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MapDeskDemo {
    public static void main(String[] args) {
        //创建线程池对象
        ExecutorService pool = Executors.newFixedThreadPool(8);

        //获取block模块
        File file = new File("hodoop/out/block");
        File[] files = file.listFiles();
        for (File block : files) {
            pool.submit(new MapDesk(block,block.getName()));

        }
        pool.shutdown();
    }
}
